import request from "@/utils/request";
export default {
  //商品分类
  userList(params) {
    return request({
      url: "/user",
      method: "get",
      params,
    });
  },
  //部门树列表
  department(params) {
    return request({
      url: "/department",
      method: "get",
      params,
    });
  },
  //获取用户详情
  userDetail(params) {
    return request({
      url: "/user/detail",
      method: "get",
      params,
    });
  },
  //编辑用户-保存数据
  userUpdate(data) {
    return request({
      url: "/user/update",
      method: "POST",
      data,
    });
  },
  //添加用户
  userCreate(data) {
    return request({
      url: "/user/create",
      method: "POST",
      data,
    });
  },
  //用户变更日志
  userOplog(params) {
    return request({
      url: "/user/oplog",
      method: "get",
      params,
    });
  },
  //添加MAC地址
  setAddMac(data) {
    return request({
      url: "/user/add-mac",
      method: "POST",
      data,
    });
  },
  //删除MAC地址
  updateMac(data) {
    return request({
      url: "/user/update-mac",
      method: "POST",
      data,
    });
  },
  //批量-验证设备MAC
  verifyMac(data) {
    return request({
      url: "/user/verify-mac",
      method: "POST",
      data,
    });
  },
  //批量-验证专属链接
  verifyElink(data) {
    return request({
      url: "/user/verify-elink",
      method: "POST",
      data,
    });
  },
  //批量-是否账号密码登录
  verifyAccountLogin(data) {
    return request({
      url: "/user/verify-account-login",
      method: "POST",
      data,
    });
  },
  //批量-批量更换部门
  changeDepartment(data) {
    return request({
      url: "/user/change-department",
      method: "POST",
      data,
    });
  },
  //批量-初始化专属链接
  initElink(data) {
    return request({
      url: "/user/init-elink",
      method: "POST",
      data,
    });
  },
  //获取配置项
  getDisableAccount() {
    return request({
      url: "/config/auto-disable-account",
      method: "get",
    });
  },
  //获取配置项
  setDisableAccount(data) {
    return request({
      url: "/config/auto-disable-account",
      method: "post",
      data,
    });
  },
  //同步员工信息
  syncFeishu(data) {
    return request({
      url: "/user/sync-feishu",
      method: "post",
      data,
    });
  },
  //基础数据集
  baseData(data) {
    return request({
      url: "/options",
      method: "post",
      data,
    });
  },
  //获取权限调整数据
  getAccess(params) {
    return request({
      url: "/user/get-access",
      method: "get",
      params,
    });
  },
  //保存权限调整数据
  setAccess(data) {
    return request({
      url: "/user/set-access",
      method: "POST",
      data,
    });
  },
  //获取数据权限分布数据
  getAccessData(params) {
    return request({
      url: "/user/access-data",
      method: "get",
      params,
    });
  },
  /**
   * 批量-发送专属链接消息
   * @param {*} params
   * @returns
   */
  sendLink(data) {
    return request({
      url: "/feishu-im/send-elink",
      method: "post",
      data,
    });
  },

  /**
   * 批量-发送专属链接消息
   * @param {*} params
   * @returns
   */
  batchOauth(data) {
    return request({
      url: "/xy/tu/batch-oauth",
      method: "post",
      data,
    });
  },
  /**
   * 批量-复制用户权限
   * @param {*} params
   * @returns
   */
  batchCopyUser(data) {
    return request({
      url: "/copy/user-permissions",
      method: "post",
      data,
    });
  },
  /**
   * 用户-登录记录
   * @param {*} params
   * @returns
   */
  loginRecord(data) {
    return request({
      url: "/ltu/login-record",
      method: "post",
      data,
    });
  },  
};
